/**
- Copyright (c) 2019 Kagilum SAS.
-
- This file is part of iceScrum.
-
- iceScrum is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License.
-
- iceScrum is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with iceScrum.  If not, see <http://www.gnu.org/licenses/>.
-
- Authors:
-
- Vincent Barrier (vbarrier@kagilum.com)
- Nicolas Noullet (nnoullet@kagilum.com)
**/

////////////////////
// iS variables, mixins & placeholders
////////////////////

// Light mode
$theme: "light" !default;
$is-bg-color: #ffffff !default;
$is-bg-color-alt: #f4f4f9 !default;
$is-bg-color-ter: #f7f7fb !default;
$is-bg-state-progress: #ffffff !default; // Custom colors
$is-text-color: #687583 !default;
$is-text-color-alt: #111111 !default;
$is-text-color-shortcut: rgba(17, 17, 17, 0.6) !default;
$is-btn-secondary-start: #f5f5fa !default;
$is-btn-secondary-end: $is-bg-color !default;
$is-shadow-color-1: rgba(156, 164, 171, 0.5) !default;
$is-shadow-color-2: rgba(156, 164, 171, 0.62) !default;
$is-shadow-color-3: rgba(62, 57, 107, 0.07) !default;
$is-search-bg-color: #ffffff !default;
$is-outline-color: #c8c8cc !default;
$is-border-color: #d3d8de !default;
$is-border-color-alt: #e9e9e9 !default;
$is-chart-lines-axis: #d3d8de !default;
$is-shadow: 0 9px 24px 0 rgba(35, 41, 48, 0.15) !default;
$is-bg-color-role-sm: $is-bg-color !default;
$is-bg-color-role-po: $is-bg-color !default;
$is-bg-color-role-po-sm: $is-bg-color !default;
// Timelines
$is-release-todo: $is-outline-color !default;
$is-release-inprogress-right: #d1e6f0 !default;
$is-release-done-right: #73d3c2 !default;
$is-sprint-todo: $is-bg-color-alt !default;
$is-sprint-inprogress-right: $is-release-inprogress-right !default;
$is-sprint-done-right: #88f3e2 !default;
$is-sprint-goal-left: rgba(99, 171, 235, 0.26) !default; // Use opacity there because we cant on the div because of the text
$is-sprint-goal-right: rgba(209, 230, 240, 0.26) !default;
$is-release-inprogress: #7Fbaec !default;

// TODO dark mode
$is-shadow-color-5: rgba(104, 117, 131, 0.53) !default;
$is-text-color-doc: #acb5c0 !default;

$is-release-inprogress-left: #1180e7;
$is-release-done-left: #43bfa2;
$is-sprint-inprogress-left: #63abeb;
$is-sprint-done-left: #50e3c2;

$is-red: #ff3e33;
$is-orange: #ff6b1c;
$is-yellow: #ffcc01;
$is-green: #27d285;
$is-blue: #0067e8;
$is-grey: #acb5c0;
$is-black: #111111;

$is-primary-color: $is-blue;

$is-spacer-x: 1.25rem;
$is-sticky-note-spacer: 0.5rem;

$is-font-size-sm: 0.875rem;
$is-sticky-note-text: $is-black;
$is-sticky-note-text-invert: white;
$is-task-width: 129px;
$is-task-height: $is-task-width;
$is-story-width: 178px;
$is-story-heigth: 177px;
$is-story-width-sm: 158px;
$is-story-heigth-sm: 127px;
$is-feature-width: 178px;
$is-feature-height: 157px;

$widget-card-height: 270px;
$widget-card-header-height: 42px;

$is-font-family: averta-regular, Helvetica, Arial, sans-serif;
$is-font-family-bold: averta-bold, Helvetica, Arial, sans-serif;

$acceptance-test-states: tocheck, success, failed;

$is-state-colors: (
        "todo": #AAAAAA,
        "frozen": #AAAAAA,
        "suggested": $is-yellow,
        "accepted": $is-orange,
        "estimated": $is-red,
        "planned": #c88cff,
        "inProgress": #297afc,
        "inReview": #00bae8,
        "done": $is-green
);

%is-title {
  font-size: 1.25rem;
  font-family: $is-font-family-bold;
  color: $is-text-color-alt;
}

@mixin background-image-retina($file-1x) {
  background-image: url("#{$file-1x}.png");
  @media only screen and (min-resolution: 97dpi), // IE11 & just above my screen density (96dpi) so it is triggered as soon as the view is zoomed in
  only screen and (-webkit-min-device-pixel-ratio: 1.5), // Safari (see https://caniuse.com/#feat=css-media-resolution)
  only screen and (min-resolution: 2dppx) { // Standard
    background-image: url("#{$file-1x}.svg");
  }
}

@mixin rectangle-background($width, $height) {
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  width: $width;
  height: $height;
}

@mixin square-background($side) {
  @include rectangle-background($side, $side);
}

@mixin text-truncate-multiline($lines) {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $lines;
  overflow: hidden;
  display: -webkit-box;
}

////////////////////
// Override bootstrap variables
////////////////////

$enable-caret: false; // Overriden by our own caret style

$font-family-base: $is-font-family;
$body-bg: $is-bg-color;
$secondary: $is-bg-color;
$red: $is-red;
$orange: $is-orange;
$yellow: $is-yellow;
$green: $is-green;
$blue: $is-blue;
$body-color: $is-text-color;
$border-radius-sm: .25rem;
$progress-border-radius: 0;
$border-color: $is-border-color-alt;

$link-color: $is-text-color;
$link-hover-color: $is-text-color;
$link-hover-decoration: none;
$emphasized-link-hover-darken-percentage: 0;
$badge-font-weight: normal;

$btn-padding-x: 1rem;
$btn-padding-y: 0.5625rem;
$btn-padding-x-sm: 0.8rem;
$btn-disabled-opacity: 0.3;

$input-bg: $is-bg-color;
$input-disabled-bg: $is-bg-color-alt;
$input-color: $is-text-color-alt;
$input-placeholder-color: $is-outline-color;
$input-height: 1.875rem;
$input-border-color: $is-outline-color;
$input-focus-border-color: $is-outline-color;
$input-padding-x: 0.5rem;
$input-font-size: $is-font-size-sm;
$input-group-addon-bg: $is-outline-color;

$navbar-padding-y: 0;
$navbar-padding-x: $is-spacer-x;
$navbar-nav-link-padding-x: 0.875rem;
$navbar-light-color: $is-text-color-alt;
$navbar-light-hover-color: $is-text-color-alt;
$navbar-light-active-color: $is-primary-color;

$nav-tabs-border-width: 0;
$nav-tabs-link-active-color: $is-primary-color;
$nav-tabs-border-radius: 0;
$nav-tabs-link-active-bg: $is-bg-color;

$card-spacer-x: $is-spacer-x;
$card-border-width: 0;
$card-bg: $is-bg-color;

$modal-md: 910px;
$modal-lg: 910px;
$modal-sm: 450px;
$modal-content-border-width: 0;
$modal-content-border-radius: 0;
$modal-header-border-width: 1px;
$modal-header-border-color: $is-border-color-alt;
$modal-content-bg: $is-bg-color;
$modal-inner-padding: 15px; // So that row negative padding work properly

$dropdown-bg: $is-bg-color;
$dropdown-link-hover-bg: $is-bg-color;
$dropdown-link-active-bg: $is-bg-color;
$dropdown-header-color: $is-text-color-alt;
$dropdown-link-color: $is-text-color-alt;
$dropdown-link-hover-color: $is-blue;
$dropdown-link-active-color: $is-blue;
$dropdown-font-size: $is-font-size-sm;
$dropdown-divider-bg: $is-border-color-alt;
$dropdown-border-radius: 0;
$dropdown-border-width: 0;

$tooltip-color: $is-text-color-alt;
$tooltip-max-width: 225px;
$tooltip-bg: $is-bg-color;
$tooltip-border-radius: 0;
$tooltip-opacity: 1;

$toast-background-color: transparent;
$toast-header-color: $is-text-color;
$toast-header-background-color: $is-bg-color;
$toast-header-border-color: $is-bg-color;
$toast-border-width: 0;
$toast-border-radius: 0;
$toast-box-shadow: none;
$toast-padding-x: 0.9375rem;
$toast-padding-y: 0.4375rem;

$alert-margin-bottom: 0;
$alert-padding-y: 0.625rem;
$alert-padding-x: 1rem;

$table-accent-bg: $is-bg-color-alt;
$table-cell-padding: 0.375rem;

$headings-margin-bottom: 0;
$h1-font-size: 2.8125rem;
$h2-font-size: 2rem;
$h3-font-size: 1.25rem;
$h4-font-size: 1rem;
$h5-font-size: 0.875rem;
$h6-font-size: 0.75rem;
$headings-color: $is-text-color-alt;
$headings-font-family: $is-font-family-bold;
$hr-border-color: $is-border-color-alt;

$pagination-bg: $is-bg-color;
$pagination-color: $is-text-color-alt;
$pagination-border-color: $is-outline-color;
$pagination-disabled-bg: $is-bg-color-alt;
$pagination-disabled-color: $is-text-color;
$pagination-disabled-border-color: $pagination-border-color;
$pagination-hover-color: $pagination-color;
$pagination-hover-bg: $is-bg-color;
$pagination-hover-border-color: $pagination-border-color;